package com.example.cloud.model.business.medical;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;

/**
 * Created by wangtao on 2018/7/2.
 * 单次治疗项目
 */
@Entity(name = "treat_plan_project")
@Data
@EqualsAndHashCode(callSuper = false)
public class TreatPlanProject extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 患者主键
    @Column(name = "patient_id")
    private Long patientId;
    // 会员主键
    @Column(name = "member_id")
    private Long memberId;
    // 主诉ID
    @Column(name = "complaint_id")
    private Long complaintId;
    // 治疗项目主键
    @Column(name = "project_id")
    private Long projectId;
    // 治疗项目名称
    @Column(name = "project_name")
    private String projectName;
    // 单价
    @Column(name = "price")
    private BigDecimal price;
    // 总次数
    @Column(name = "quantity")
    private int quantity;
    // 已执行次数
    @Column(name = "execute", columnDefinition = "INT DEFAULT 0")
    private int execute;
    // 总价
    @Column(name = "total_price")
    private BigDecimal totalPrice;
    // 医嘱备注
    @Column(name = "medical_advice")
    private String medicalAdvice;
    // 收费状态{0：未收费 1：已收费}
    @Column(name = "charge_status", columnDefinition = "INT DEFAULT 0")
    private int chargeStatus;
    // 状态{0: 治疗中 1:已完成 2：治疗结束}
    @Column(name = "status", columnDefinition = "INT DEFAULT 1")
    private int status;
}
